| Name |
Description |
Example |
Error Codes |
| blank |
set to false if a string value cannot be blank |
|
className.propertyName.blank |
| email |
set to true if a string value is an email address |
|
className.propertyName.email.invalid |
| inList |
constrains a value so that it must be contained within the given list |
name(inList:["Joe", "Fred", "Bob"] )
|
className.propertyName.not.inList |
| length |
Uses a Groovy range to restrict the length of a string or array |
|
className.propertyName.length.toolong, className.propertyName.length.tooshort |
| min |
sets the minimum value of a class that implements java.lang.Comparable |
|
className.propertyName.min.notmet |
| minLength |
sets the minimum length of a string or array property |
|
className.propertyName.minLength.notmet |
| minSize |
sets the minimum size of a collection or number property |
|
className.propertyName.minSize.notmet |
| matches |
Applies a regular expression against a string value |
login(matches:"[a-zA-Z]")
|
className.propertyName.matches.invalid |
| max |
sets the maximum value of a class that implements java.lang.Comparable |
|
className.propertyName.max.exceeded |
| maxLength |
sets the maximum length of a string or array property |
|
className.propertyName.maxLength.exceeded |
| maxSize |
sets the maximum size of a collection or number property |
|
className.propertyName.maxSize.exceeded |
| notEqual |
validates that a property is not equal to the specified value |
|
className.propertyName.notEual |
| nullable |
set to false if the property value cannot be null |
|
className.propertyName.nullable |
| range |
Uses a Groovy range to ensure that a property's value occurs within a specified range |
age(range:minAge..maxAge)
|
className.propertyName.range.toosmall or className.propertyName.range.toobig |
| size |
Uses a Groovy range to restrict the size of a collection or number |
|
className.propertyName.size.toosmall or className.propertyName.size.toobig |
| unique |
set to true if the property must be unique (this is a persistent call and will query the database) |
|
className.propertyName.not.unique |
| url |
set to true if a string value is a URL address |
|
className.propertyName.url.invalid |